Closed
Description
Terms aggregations enables sorting by sub metric aggregation, a la:
{
"aggregations": {
"host": {
"terms": {
"field": "host",
"order": {
"cpu_avg": "asc"
}
},
"aggs": {
"cpu_avg": {
"avg": {
"field": "cpu"
}
}
}
}
}
}
unfortunately, that got broken along the way.
The fix will be mostly based on #4472
thx @alexbrasetvik